100 REM CONVERTING LOCAL TIME TO TIME ZONES WORLDWIDE
105 WIDTH 80
110 GOTO 160: REM IBM BASIC
120 PRINT STRING$(80, 45): RETURN
130 CLS : FOR X = 1 TO 10: PRINT : NEXT X: RETURN
140 PRINT : INPUT "PRESS >RETURN< (Q TO QUIT) ", R$: IF R$ = "Q" THEN 150 ELSE RETURN
150 GOSUB 130: GOSUB 120: PRINT TAB(38); "END.": GOSUB 120: END
160 TT$ = "THE TIME IN THE COUNTRY YOU ASKED FOR IS ": GOSUB 130: GOSUB 120
170 GMT$ = "GREENWICH MEAN TIME IS ": ST$ = " STANDARD TIME"
180 PRINT TAB(5); "THIS PROGRAM CONVERTS LOCAL TIME TO TIME ANYWHERE IN THE WORLD"
190 GOSUB 120: GOSUB 140: GOSUB 130
200 PRINT "DO YOU WANT TO CONVERT FROM LOCAL ": PRINT
210 PRINT 1, "STANDARD TIME": PRINT 2, "DAYLIGHT TIME": GOSUB 120
220 INPUT "WHICH?  ", WHICH: GOSUB 130: PRINT "DO YOU WANT TO CONVERT FROM": PRINT
230 PRINT 1, "EASTERN TIME": PRINT 2, "CENTRAL TIME": PRINT 3, "MOUNTIAN TIME"
240 PRINT 4, "PACIFIC TIME": PRINT 5, "YUKON TIME": PRINT 6, "ALASKA/HAWAII TIME"
250 PRINT 7, "BERING TIME": GOSUB 120: INPUT "WHICH?  ", TIME: GOSUB 130: GOTO 370
260 GOSUB 120: IF CTRY = 9 THEN 280 ELSE 270
270 PRINT T$; TIME1; ":"; MINUTE$; " "; M$; ST$: GOTO 290
280 MIN = MINUTE + 30: IF MIN > 59 THEN MIN = MIN - 60
285 MIN$ = STR$(MIN): PRINT T$; TIME1; ":"; MIN$; " "; M$; ST$
290 GOSUB 120: GOSUB 310
300 PRINT GMT$; TIME2; ":"; MINUTE$; " "; M$: GOSUB 120: GOSUB 140: GOSUB 560
310 TIME2 = HOUR + (TIME + 4): IF TIME2 > 12 THEN M$ = "PM" ELSE M$ = "AM"
320 IF TIME2 > 24 THEN M$ = "AM"
330 IF TIME2 > 24 THEN TIME2 = TIME2 - 24
340 IF TIME2 > 12 THEN TIME2 = TIME2 - 12
350 IF TIME2 < 1 THEN TIME2 = TIME2 + 12
360 RETURN
370 PRINT "COUNTRIES (ALPHABETICALLY):": GOSUB 120
380 PRINT 1, "ARGENTINA": PRINT 2, "BRAZIL": PRINT 3, "CHINA": PRINT 4, "ENGLAND": PRINT 5, "EGYPT"
390 PRINT 6, "FRANCE": PRINT 7, "GERMANY": PRINT 8, "GREECE": PRINT 9, "INDIA": PRINT 10, "IRELAND"
400 PRINT 11, "ISREAL": PRINT 12, "ITALY": PRINT 13, "JAPAN": PRINT 14, "KENYA"
410 PRINT 15, "PHILIPPINES": PRINT 16, "PORTUGAL": PRINT 17, "RUSSIA (MOSCOW AREA)"
420 PRINT 18, "SOUTH AFRICA": PRINT 19, "SPAIN": PRINT 20, "TURKEY": GOSUB 120
430 INPUT "WHICH?  ", CTRY: GOSUB 130: GOSUB 580: T$ = TT$: GOSUB 260
440 TIME1 = TIME2 + GMT - TT: TIME2 = TIME1 - GMT + TT
450 IF TIME1 > 12 THEN M$ = "PM"
460 IF TIME1 < 12 THEN M$ = "AM"
470 IF TIME1 = 12 THEN 480 ELSE 490
480 IF MINUTE = 0 THEN M$ = "NOON" ELSE M$ = "PM"
490 IF TIME1 = 24 THEN 500 ELSE 510
500 IF MINUTE = 0 THEN M$ = "MIDNIGHT" ELSE M$ = "AM"
510 IF TIME1 > 24 THEN M$ = "AM"
520 IF TIME1 > 24 THEN TIME1 = TIME1 - 24
530 IF TIME1 > 12 THEN TIME1 = TIME1 - 12
540 IF TIME1 < 1 THEN TIME1 = TIME1 + 12
550 RETURN
560 GOSUB 130: INPUT "ANOTHER TIME CONVERSION?(Y/N)  ", TC$
570 IF TC$ <> "N" THEN GOSUB 130: GOTO 200 ELSE 150
580 TT = TIME + 4: IF WHICH = 2 THEN TT = TT + 1
590 INPUT "LOCAL TIME? (HOUR ONLY, NO MINUTES)     ", HOUR
600 INPUT "LOCAL TIME? (MINUTES)                   ", MINUTE
602 IF MINUTE = 0 THEN MINUTE$ = "00": GOTO 610
604 MINUTE$ = STR$(MINUTE)
606 IF LEFT$(MINUTE$, 1) = " " AND LEN(MINUTE$) = 2 THEN MINUTE$ = "0" + MID$(MINUTE$, 2, 1)
610 INPUT "AM (A) OR PM (P)?                       ", AM$
620 IF AM$ = "P" THEN HOUR = HOUR + 12
630 TIME2 = HOUR + TT
640 IF CTRY = 4 OR CTRY = 10 OR CTRY = 16 THEN GMT = TT
650 IF CTRY = 6 OR CTRY = 7 OR CTRY = 12 OR CTRY = 19 OR CTRY = 8 THEN GMT = TT + 1
660 IF CTRY = 20 OR CTRY = 11 OR CTRY = 18 OR CTRY = 5 THEN GMT = TT + 2
670 IF CTRY = 14 OR CTRY = 17 THEN GMT = TT + 3
680 IF CTRY = 1 OR CTRY = 2 THEN GMT = TT - 3
690 IF CTRY = 9 THEN GMT = TT + 5
700 IF MIN > 59 THEN MIN = MIN - 60 AND GMT = GMT + 1
710 IF CTRY = 15 THEN GMT = TT + 10
720 IF CTRY = 3 THEN GMT = TT + 8
730 IF CTRY = 13 THEN GMT = TT + 9
740 GOTO 440


